<div class="form-group">
	<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>专家名称</label>
	<div class="col-sm-9 col-xs-12">
		<input type="text" name="goodsname" id="goodsname" class="form-control" value="{$item['title']}" />
	</div>
</div>
<div class="form-group">
	<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>专家电话</label>
	<div class="col-sm-9 col-xs-12">
		<input type="text" name="phone" id="goodsphone" class="form-control" value="{$item['phone']}" />
	</div>
</div>
<div class="form-group">
	<label class="col-xs-12 col-sm-3 col-md-2 control-label">专家昵称</label>
	<div class="col-sm-9 col-xs-12">
		<input type="text" name="nickname" id="goodsnickname" class="form-control" value="{$item['nickname']}" />
	</div>
</div>
<!--<div class="form-group">-->
	<!--<label class="col-xs-12 col-sm-3 col-md-2 control-label">专家单位</label>-->
	<!--<div class="col-sm-6 col-xs-6">-->
		<!--<input type="text" name="unit" id="unit" class="form-control" value="{$item['unit']}" />-->
		<!--<span class="help-block">如: 个/件/包</span>-->
	<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
	<!--<label class="col-xs-12 col-sm-3 col-md-2 control-label">专家属性</label>-->
	<!--<div class="col-sm-9 col-xs-12" >-->
		<!--<label for="isrecommand" class="checkbox-inline">-->
			<!--<input type="checkbox" name="isrecommand" value="1" id="isrecommand" {if $item['isrecommand'] == 1}checked="true"{/if} /> 首页推荐-->
		<!--</label>-->
		<!--<label for="isnew" class="checkbox-inline">-->
			<!--<input type="checkbox" name="isnew" value="1" id="isnew" {if $item['isnew'] == 1}checked="true"{/if} /> 新品推荐-->
		<!--</label>-->
		<!--<label for="ishot" class="checkbox-inline">-->
			<!--<input type="checkbox" name="ishot" value="1" id="ishot" {if $item['ishot'] == 1}checked="true"{/if} /> 热卖推荐-->
		<!--</label>-->
		<!--<label for="isdiscount" class="checkbox-inline">-->
			<!--<input type="checkbox" name="isdiscount" value="1" id="isdiscount" {if $item['isdiscount'] == 1}checked="true"{/if} /> 折扣专家-->
		<!--</label>-->
		<!--<label for="istime" class="checkbox-inline">-->
			<!--<input type="checkbox" name="istime" value="1" id="istime" {if $item['istime'] == 1}checked="true"{/if} /> 限时卖-->
		<!--</label>-->
	<!--</div>-->
<!--</div>-->


<div class="form-group">
	<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>分类</label>
	<div class="col-sm-8 col-xs-12">
				<select class="form-control tpl-category-parent"  name="category[parentid]" >
					<option value="0">请选择分类</option>
					<?php 
				
					foreach($parent as $key=>$val ){ ?>
					<option value="{$val['id']}"  <?php echo ($val['id'] ==  $item['pcate']) ? 'selected="selected"' : '';?>>{$val['name']} </option>;
					<?php } ?>
				</select>
		
	</div>
</div>

<div class="form-group">
	<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>专家图</label>
	<div class="col-sm-9 col-xs-12">
		{php echo tpl_form_field_image('avatar', $item['avatar'], '', array('extras' => array('text' => 'readonly')))}
	</div>
</div>

<!--<div class="form-group">-->
	<!--<label class="col-xs-12 col-sm-3 col-md-2 control-label">专家编号</label>-->
	<!--<div class="col-sm-4 col-xs-12">-->
		<!--<input type="text" name="goodssn" id="goodssn" class="form-control" value="{$item['goodssn']}" />-->
	<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
	<!--<label class=" col-sm-3 col-md-2 control-label">专家条码</label>-->
	<!--<div class="col-sm-4 col-xs-12">-->
		<!--<input type="text" name="productsn" id="productsn" class="form-control" value="{$item['productsn']}" />-->
	<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
	<!--<label class="col-xs-12 col-sm-3 col-md-2 control-label">专家价格</label>-->
	<!--<div class="col-sm-9 col-xs-12">-->
		<!--<div class="input-group form-group">-->
			<!--<span class="input-group-addon">销售价</span>-->
			<!--<input type="text" name="marketprice" id="marketprice" class="form-control" value="{$item['marketprice']}" />-->
			<!--<span class="input-group-addon">元</span>-->
		<!--</div>-->
		<!--<div class="input-group form-group">-->
			<!--<span class="input-group-addon">市场价</span>-->
			<!--<input type="text" name="productprice" id="productprice" class="form-control" value="{$item['productprice']}" />-->
			<!--<span class="input-group-addon">元</span>-->
		<!--</div>-->
		<!--<div class="input-group form-group">-->
			<!--<span class="input-group-addon">成本价</span>-->
			<!--<input type="text" name="costprice" id="costprice" class="form-control" value="{$item['costprice']}" />-->
			<!--<span class="input-group-addon">元</span>-->
		<!--</div>-->
		<!--<div class="input-group form-group">-->
			<!--<span class="input-group-addon">原价</span>-->
			<!--<input type="text" name="originalprice" id="originalprice" class="form-control" value="{$item['originalprice']}" />-->
			<!--<span class="input-group-addon">元</span>-->
		<!--</div>-->
	<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
	<!--<label class="col-xs-12 col-sm-3 col-md-2 control-label">重量</label>-->
	<!--<div class="col-sm-6 col-xs-12">-->
		<!--<div class="input-group">-->
			<!--<input type="text" name="weight" id="weight" class="form-control" value="{$item['weight']}" />-->
			<!--<span class="input-group-addon">克</span>-->
		<!--</div>-->
	<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
	<!--<label class="col-xs-12 col-sm-3 col-md-2 control-label">库存</label>-->
	<!--<div class="col-sm-6 col-xs-12">-->
		<!--<div class="input-group">-->
			<!--<input type="text" name="total" id="total" class="form-control" value="{$item['total']}" />-->
			<!--<span class="input-group-addon">件</span>-->
		<!--</div>-->
		<!--<span class="help-block">当前专家的库存数量</span>-->
	<!--</div>-->
<!--</div>-->
<input type="hidden" name="totalcnf" value="2" id="totalcnf1" />
<!--<div class="form-group">-->
	<!--<label class="col-xs-12 col-sm-3 col-md-2 control-label">单次最多购买量</label>-->
	<!--<div class="col-sm-6 col-xs-12">-->
		<!--<div class="input-group">-->
			<!--<input type="text" name="maxbuy" id="maxbuy" class="form-control" value="{$item['maxbuy']}" />-->
			<!--<span class="input-group-addon">件</span>-->
		<!--</div>-->
	<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
	<!--<label class="col-xs-12 col-sm-3 col-md-2 control-label">用户最多购买量</label>-->
	<!--<div class="col-sm-6 col-xs-12">-->
		<!--<div class="input-group">-->
			<!--<input type="text" name="usermaxbuy" class="form-control" value="{$item['usermaxbuy']}" />-->
			<!--<span class="input-group-addon">件</span>-->
		<!--</div>-->
	<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
	<!--<label class="col-xs-12 col-sm-3 col-md-2 control-label">已出售数</label>-->
	<!--<div class="col-sm-6 col-xs-12">-->
		<!--<div class="input-group">-->
			<!--<input type="text" name="sales" id="sales" class="form-control" value="{$item['sales']}" />-->
			<!--<span class="input-group-addon">件</span>-->
		<!--</div>-->
	<!--</div>-->
<!--</div>-->
<div class="form-group">
	<label class="col-xs-12 col-sm-3 col-md-2 control-label">专家课堂费用</label>
	<div class="col-sm-6 col-xs-12">
		<div class="input-group">
			<input type="text" name="credit" id="credit" class="form-control" value="{$item['credit']}" />
			<span class="input-group-addon"></span>
		</div>
		<p class="help-block"></p>
	</div>
</div>

<script language="javascript">

	$(function () {
		var i = 0;
		$('#selectimage').click(function () {
			var editor = KindEditor.editor({
				allowFileManager: false,
				imageSizeLimit: '30MB',
				uploadJson: './index.php?act=attachment&do=upload'
			});
			editor.loadPlugin('multiimage', function () {
				editor.plugin.multiImageDialog({
					clickFn: function (list) {
						if (list && list.length > 0) {
							for (i in list) {
								if (list[i]) {
									html = '<li class="imgbox" style="list-type:none">' +
												'<a class="item_close" href="javascript:;" onclick="deletepic(this);" title="删除"></a>' +
												'<span class="item_box"> <img src="' + list[i]['url'] + '" style="height:80px"></span>' +
												'<input type="hidden" name="attachment-new[]" value="' + list[i]['filename'] + '" />' +
											'</li>';
									$('#fileList').append(html);
									i++;
								}
							}
							editor.hideDialog();
						} else {
							alert('请先选择要上传的图片！');
						}
					}
				});
			});
		});
	});

	function deletepic(obj) {
		if (confirm("确认要删除？")) {
			var $thisob = $(obj);
			var $liobj = $thisob.parent();
			var picurl = $liobj.children('input').val();
			$.post('{php echo $this->createMobileUrl('ajaxdelete',array())}', {pic: picurl}, function (m) {
				if (m == '1') {
					$liobj.remove();
				} else {
					alert("删除失败");
				}
			}, "html");
		}
	}

</script>